// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from './utils/axiosRequest';
import VueAxios from 'vue-axios';
import qs from 'qs'
import VueCookies from "vue-cookies";


Vue.use(ElementUI);
Vue.use(VueAxios,axios);
Vue.use(VueCookies);
Vue.config.productionTip = false
Vue.prototype.$qs = qs
//配置axios默认路由
axios.defaults.baseURL=process.env.BASE_URI
//设置某些网页不能访问
router.beforeEach((to,from,next) => {

  if (to.meta != null && to.meta.isLogin == false) {
    alert("此路不通");
  } else{
    next();
  }
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {
    App
  },
  template: '<App/>'
})
